#!/bin/bash
pid=$(ps -ef | grep "tao-admin" | grep -v grep | awk '{print $2}')
if [ -n "$pid" ]; then
  kill -9 $pid
fi
echo "执行go build 生成可执行文件"
go build main.go
echo "构建完成"
mv main tao-admin
nohup ./tao-admin>tao-admin.log 2>&1 &
